#include <stdio.h>
#include <unistd.h>


int main()
{
    FILE* pfp = fopen("log.txt","r");
    char buffer[20] = { 0  };
    pid_t id = fork();
    if (id == 0)
    { 
        FILE* pfc = fopen("log.txt","w");
        fwrite("hello wolrd",10,1,pfc);
    }
    fread(buffer,3,1,pfp);
    buffer[3] = 0;
    printf("buffer: %s\n",buffer);
    return 0;
}
